compute the filepaths first

Computing the Context object was awkward because part of it (the file
paths) had to be computed first and passed around to the helper
functions. Refactoring the file paths to a separate objects allows the
work to be divided into cleaner, separate passes.