Check if symlink exists before deleting.
Improve error handling when getting mercurial commit log.