Update scripts to test for directory before trying to cd into it