Moved file path expansion into it's own class.

This makes it easier to re-use in the upcoming Rake task.