Add runInWorkingDir higher-order function

A function that accepts a function to execute while the current working
directory is temporarily changed.