Only change working directory into projectDirectory when it's set, making tasks runnable without setting projectDirectory