_artifactcache: Fix crash in push_directory() without artifact server Closes #708 See merge request !871