Fix #32 by guarding against bad paths.