Few little fixes.

I have fixed few little things I have noticed when using this script (awesomely useful, BTW). Nothing critical, but you might want to merge them back...

Cheers,

Patrik