Altered dynamic routes to not use database

The routes get loaded before the DB class is initialized so the dynamic
routes have to be pulled from an include file. For some reason the DB
method worked locally but it shouldn’t have. The new method writes to a
dynamic_routes.php file which gets included to the main routes.php file.