ugly fix for random "couldn't find HOME environment -- expanding '~'"