Fix some file-spec mappings and added tests