Escape ' characters in filepaths.

is_in_a_repo() throws an error, if the path to the current file contains a ' character, because directory_of_current_file() returns an unescaped path.