Use exec's cwd functionality

Exec can work directly in a specific directory using the cwd command.
This way I don't need to run the cd commands myself.