Use templates for all file resources with content attributes

spec tests are passing with minor change, due to a missing newlines.