fix youtube KeyError

Added missing functions for newly (I suppose) added JS functions for HTML5-video script on Youtube.
The "Expression Intepreter" didn't have these functions so it couldn't figure out how to handle the Signature-key, so I found them in the HTML5 Javascript and "JS NICE'd" it to readable code and translated the functions from Javascript to Python.
I'm a PHP guy, never touched Python - just needed to fix this tonight, so sorry if it's lousy code. I can now download all videos from YouTube again.