Proper directory_map test skip

* added the needed trailing backslash
* use is_dir() instead of opendir() as it doesn't throw error on failure