Implemented the simulation creation aspect of storing traces.

Traces can now be stored by simulation run. There are some things that could be tidied up, but it will serve for now.
Added links to the traces.html errors

This means that in the event that there are no stored traces, you can still find your way back to the homepage.