fix code for http://anton-shuvalov.info/2012/06/15/TextMate2-mate-and-rmate/