earliboy's script is working fine.
You are calling the script the wrong way.