Changed how the working directory is set

Apparently -D doesn't work on our grid, so I cd in the top of the
scripts.