Ruby script for image resize