added support for directories with single quotes. fixes #315