Fix buggy SQLAlchemy requests in get_next_job
Make process_changes $PWD agnostic