don't replace the last dash as that is the release separator

rpm versions can optionally specify releases. neither versions nor releases can have dashes, however version and release are separated with a dash, fixes #601