Fixed certain valid images not being recognized.

Stupid me, a str.strip call where a str.rstrip call should have
been caused images that tell what they are animation-wise with an
underscore (such as "foo_0.png" or "foo_strip5.png") were rejected.
This is fixed now. Also fixed a less important bug where images
that just contained the name (such as "foobarbaz.png" for a sprite
called "foobar") were wrongly accepted.