fixed bug with getting back to directory where file was removed