fix errors caused by trying to manage all dirs and files in $basepath