Skip filenames that are prefixed with xid-

The Blackboard Content System is apparently silently converting paths
where the filename is prefixed with xid- to other paths. This has
something do with the Xythos integration. xid seems to be treated as an
Xythos ID. So if we have a file named xid-1234.jpg, the BB API will
translate the path to the file with the Xythos ID of 1234.

Also added additional protection and logging that are caused by invalid
files. These were found when the xid-* translation mechanism caused it
to translate to directories or non-existent files.