Fixed issue when path contains spaces