Fix svn fetch_revision error

Escape backslash of `sed` command argument. Close #1061
Use `svn log -l 1` to get the last revision of working directory.
`svn log -r HEAD` outputs empty result if the working directory
is a subdirectory in the repository and a directory outside the
working directory has latest revision.

`svn log -l 1` shows only the first 1 log message.
The default revision range for a local path is BASE:1.
http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.log.html
Merge pull request #1070 from shirosaki/svn_fetch_revision

Fix svn fetch_revision error