unset_machine_user, bugfixes for write_file (using /tmp instead of /home/marvin/tmp, cache invalidation