Improve support of directory names with spaces