bash script for resizing and renaming images