DEVNAME is set to the name of the device before the script is called.
That name is the mount point, not the device name, which will start with /dev/ $DEVNAME is relative to /dev. You need to set up a rule in /etc/udev/rules/ to ensure the device always has the same device name. If you don't it will be sda if you plug it in first but sdb if you connect another USB storage device first.
All scripts in /etc/dev.d are run when a device is connected, so it shouldn't matter what you call it.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)