Fix bugs which prevent brew-gem from working (OS X 10.8)

1. The commit to enable installing dependent gems does not work correctly. `brew-gem` invariably fails with

        Error: undefined method `[]' for #<Version:0x109ae52b8>

    because the Homebrew version variable (as opposed to the brew-gem one) is not an array.

2. With the version of `gem` on my machine (1.3.6) the bin files will be installed to `/usr/local/bin` even when `--install-dir` is specified. The `--bindir` option must also be specified in order to put the command in the right place.

This changes seemed sufficiently different to warrant different commits. If you want me to squash them, I'll do so. Also, since the version of brew-gem currently in Homebrew does not work, if you could submit a new version to them, that would be great.