Fixed issue with root not being a dir and issues because folders were encoded