with_rw_directory will now put the directory into an environment variable, RW_DIR,
as well. This helps testing enormously.