Fixed a bug with directories with spaces.