ensure envdir file is not a directory