Fix infinite loop when parent directory does not exist
Fix infinite loop when parent directory does not exist

resolves #241

ndbroadbent/scm_breeze,scmbreeze/scm_breeze,ndbroadbent/scm_breeze,scmbreeze/scm_breeze