Fix crash with missing folder.  Fixes #792.