Clean up file paths.
Added /api/v2/* prefix to denote API versions; added back old /api/list endpoint for backwards compat.

Creating directories as needed.