Fixed savepng bug.

I borrowed savepng from an earlier script I wrote and forgot to change
something. Every image was being saved in a "../img/" directory which didn't
always exist.