Minor code cleanup
Fix for attempting command in bad directory