Add ~x.y.z and ^x.y.z parsing

Same behaviour as https://www.npmjs.org/doc/misc/semver.html#caret-ranges-1-2-3-0-2-5-0-0-4- 
Will add a comment with a link.