Usually means you are running on Windows and there is a file system lock on .\data\web_studio\config directory, possibly due to having an Explorer window open to the .\data\ directory, or anti-virus scanning. Try manually deleting and recreating the .\data\web_studio\config directory.
dont think this is the case in this instance. If I try to manually run the emgr_update command the command is not recognised even though the ENDECA_ROOT variable is set correctly and the path variable contains %ENDECA_ROOT%\bin
The machine is rebooted every night but this morning I tried the emgr_update command with the explicit file path prefixing emgr_update and it worked. So I updated the path variable to explicitly include the file path, rebooted and it worked. Unfortunately when I remove the explicit path and reboot it still works so I'm non the wiser about how this problem has been fixed.
The bottom line is that it is fixed now and I have several things to try if it happens again.