escape directory names, in case of spaces

@benolee pointed out that if the directory in question has spaces in the
names, the script would fail because it wasn't quoted.