Minor fixes to profile export function.
Implement 'save' command.