Warn on various deployment problems

... instead of failing silently.

 * When trying to deploy over the file:/// protocol
 * When trying to deploy over a PDF file, withouth PDF.js

Fixes #1650.