fixed to work with files/dirs with spaces in names