don't treat single file as dir. Fixes #596