Convert direct file access to use pkg_resources instead