Remove mutable default argument from platform_img

See [Fredrik Lundh's explanation of why this is bad](http://effbot.org/zone/default-values.htm).

Also added tests.