The bad news is that Apple often makes changes to WebKit, which overwrite this patch (e.g. many system and security updates will do this), but the good news is this script is fairly resilient the way it is written, and is likely to work long into the future, even with newer versions of Mac OS.
How the patch works: Only two bytes are changed in the WebCore file. Two lookup table entries for the word "autocomplete" are altered by changing the "A" character to an "x". This effectively disables checking for the "autocomplete=off" flag, so the flag is ignored. A one-line perl search-and-replace call makes the patch. This simple technique should allow the script to function well into the future over many different versions of WebKit and Mac OS.
This script is an open source AppleScript application.
About security: While the "autocomplete=off" gimmick might increase security for a malware infested OS like Windoze, the opposite is true for a secure OS like MacOS X. Use of this flag is actually a security risk for the Mac user because it encourages users to use weak passwords, or to save them on disk as a plaintext file. Passwords are far more secure sitting encrypted in the Mac's Keychain (which Safari uses to store this kind of information). If you don't have to remember and type in the password manually, you are far more likely to use a strong password.