fix from Matthew Hagerty regarding a check for SM_PATH