cleanup some poop andexplicitly passthrough __dirname in case of anyone else's funny business.