Fail gracefully if no files found to upload

Fixes: https://issues.jenkins-ci.org/browse/JENKINS-23549