Clean up source-code version detection

Rewrite and avoid the regex that incorrectly used the /s switch; also simplify: we only need to support git nowadays.

(Also: I'm sure you're like me and o_O when you see a naked 'rescue', but in this case I think it's warranted: we don't want to propagate failure if the git command doesn't work.)

Thanks, @davidcelis @jcooke -- I'll change it to rescue ENOENT. I'd originally left it as a naked "rescue" intending that any non-StandardError exceptions should get through (so I probably wouldn't ```rescue Object```) but I can't think of another exception that backticks would raise.