fix a couple of little bugs involving expanding path names