Addressed code-review comments and added test for space group in .car

- Trim space before and after the space group parameter.
- Added unit test to check if space group parameter is recognized in .car
and set properly.