php image (local or remote) resizing and caching script