Awrite. I've updated the script a bit (fixed the login part) and hopefully it should work fine now.

If you're having any other issues, let me know!

@dev, if you can see /u/{Your Username}/ then it logs in perfectly. Make sure you're providing complete server path to your file in the filelocation variable.