I found the problem was not with my script or cronjob but the variable logfile_rotate in squid.conf was not set.
The default was to be 10 but again I had to manually set it to 10 and then I got a fresh access.log each time the log rotated.