CodeSleeve/stapler — pull request #88 by pryley (2014-09-19 15:10:28+00:00)
Title: Remove any query strings at end of the filename

This fixes the problem you get when trying to save a profile image
pulled from the Facebook graph API.

Example image string:
https://fbcdn-profile-a.akamaihd.net/hprofile-ak-xpf1/v/t1.0-1/10222917_
10152323446467649_8217804623745092321_n.jpg?oh=6eba1683174247d11810cec33
0b2eb5e&oe=54953C34&__gda__=1422013996_8ff849b29f4370ae833f4b4d8078be5c

If we try to save this image with Stapler, we get the following error:

Imagine\Exception\InvalidArgumentException
Saving image in
"jpg?oh=6eba1683174247d11810cec330b2eb5e&oe=54953C34&__gda__=1422013996_
8ff849b29f4370ae833f4b4d8078be5c" format is not supported, please use
one of the following extension: "gif", "jpeg", "png", "wbmp", "xbm"