Fixed handling of spaces in paths