Quite a few changes

* Add new functions to dualboot.sh for formatting secondary 'partitions'
* Separate file I/O stuff into common.py
* Dynamically modify init.target.rc in AOSP ROMs
* Initial support for autopatching updater-script files