ported patches from mxcl/macvim.rb to address issue #1