Works exactly the same way as certificates:download does and filters out any inactive provisioning profiles.
I have also literally never written any ruby code before, so I just pattern matched my way through. If I've committed some grave ruby error, let me know and I'd be happy to fix.
Added profiles:download command that functions analogously to certifi…
That's some pretty non-trivial code for your first time using Ruby! Well done! This looks just fine. Thanks for adding this :)