Strips whitespace from profile option values.

Also updates associated unit tests