don't clobber initial slash and add test for deleteDir