How to download latest version of MK programatically

This is great. My only suggestion would be to add beta releases as well in the future (starting with 2.2.0b1).