Implement generation of redirects.json. See #6.