Modify script to change between directories