Fix for paths with spaces, dashes and probably other problematic chars

Please verify on Linux/Mac