Use underscore for basenames to accomodate multi-word resource names

cc @fancyremarker