Add function to return mechanics expressions as strings.
Use % syntax for string formatting to fix test.
Fix incorrect % string formatting usage.
Merge pull request #2069 from oliverlee/msprint

Add function to return mechanics expressions as strings.