Only convert the dashes in version if it exists.
Merge pull request #399 from quiffman/version-not-nil

Only convert the dashes in version if it exists.