Mangle filenames in block descriptors so they'll always parse.

Fixes #961.