Fix core::env cleanup code

Mark fake home directories that failed to be created, so we won't
try to remove them and have cleanup just use p_rmdir.