Rewrite createDirectory to avoid charset in Content-Type, fixes #1