Rewrite ramdisk script, lots of cleanup

Change-Id: I967e3bb07b239941ea51af6b09d61d7b08138f43
Merge "Rewrite ramdisk script, lots of cleanup" into du44