I found I made a mistake in naming my script. It should be Idle_Leave NOT Idle_Exit
Also I encountered the same issue as `version` of state-scripts in /etc/mender when I tried to run my scripts. If the version file does not exist in your /etc/mender/scripts directory you have to create one and write 3 into the file. I used mender-convert to make my image and this file was not present. I found version file in /data/mender/scripts but it was empty.