Remove mutable default argument from platform_img

See http://effbot.org/zone/default-values.htm for decent explanation of
why this is bad.

Also added tests.