fix quoting and simplify upstream reference check

We can count directly without having to `rev-parse --abbrev-ref` (but let me know if this was to avoid some issue).

@{u} needed to be quoted in my zsh config, and should not change anything if it was working for other people.

Fixes https://github.com/sindresorhus/pure/pull/18#issuecomment-24470736