Move redirect config parser into its own module

In preparation for tests (#3)