Respect the prependFiles option in the done and fail callbacks. Fixes #2493
Merge branch 'master' into gh-pages