Escape file name

Recreate pull request #804

Fix issue #802. Escape all special characters in file name and path. And remove redundant `-` sign as `Octopress`.

Due to issue #803, I cannot run the unit test, so I'm not sure whether this breaks any unit test.