Fixed incorrect handling of paths contaiin whitespaces