fixed bash script to convert pdf to jpgs