Fix unserializable RegExps in requireConfig

fixes #41. This pull request will allow RegExps to be passed through the JSON serializer untouched. Adding future unserializable types should now also be trivial.