I upgraded from 5.2.5 to 5.2.16 and I am having the same problem. The first time I rolled back to the previous version of the database and tried again. In both instances the script ran with no errors, telling me to delete the install directory and giving me a link to access the admin section, but when I click on it, I just get maintenance mode. I followed all instructions for a full upgrade twice. I think there must be a bug in the script. If the above fix works, I don't see any alternative.
[--- updated ---]
I am having the same problem, upgrading from 5.2.5 to 5.2.16. I have rolled back and reinstalled twice. In each case, the upgrade script ran with no errors, and gave me a link to access the admin area. In each case, I was stuck in maintenance mode. It sounds like a bug to me. The fix suggested by epretorius did not work for me, so I restored the value to 5.2.5.