Fix event creation when Drupal is installed in subdir.

Event creation from fullcalendar is broken if Drupal is installed on a subdirectory. 
See https://www.drupal.org/node/2325897