Handle graph directories not existing.

- Added handling for when the directory containing the graphs
  doesn't exist.
- Removed duplicate code from the clear_usage_graphs management script.