moodle 2: better handle missing files and external references
Merge pull request #64 from maneframe/files

moodle 2: better handle missing files and external references