Factored out directory init and modification in tests.

Also fixed mtime problem with make_dir_tree and added the ability
for build_path_set_dirtree to exclude directories from the set to
emulate adding to an update set (which doesn't get directories)
More tests, mock call list comparison helpers, and shebangs.