Fixed issue where server side exceptions were not propagated correctly
to the browser. Also fixed issue where file names starting or ending
with a space now are trimmed when imported into alfresco.

Signed-off-by: Marcus Svensson <marcus.svensson@redpill-linpro.com>