fix #1229 -- replace __file__ with resource_filename()

While we don’t use eggs, this is still good practice we can happily implement, right?