Add the tmp_dir option

An option to select the directory used to store temporary files and
directories, such as build directory.