Url issue

Fix the bug for important sub-metrics
Hm not sure about this as it's a tradeoff between consistency/readability and performance but these metrics don't seem long. Still running O(n).

We can make this a separate function:

```python
def metrics_to_csv(FH, sub_metrics):
  for sub_metric in sub_metrics:
    percentile_data = ...
    ...
    ...
    FH.write
```

Then lines 337-341 can be:

```python
metrics_to_csv(FH, self.calculated_stats)
```

And lines 353-358 can be:

```python
metrics_to_csv(FH_IMP, [m for m in self.important_sub_metrics if m in self.calculated_stats.key()])
```