Refactor get_profile_dir(...).

- Separate creating and removing profiles into separate functions.
- Rename the function to better reflect what it does.
Implement a list-profiles option.
Fix calling wrong function names.

Broken by recent refactoring.