A little PSR-2'ing and doing a directory check before attempting to map a directory (prevents logs filling up)