So, I am going to reply to myself as I have solved it. I believe that the user_data script was not fully executing before the remote copy and commands were run. I was surprised to find this, the script was only creating a few directories, which I thought would be eyeblink in time. Anyway, by moving the critical mkdirs to a remote command, it all works just fine.