fixes and improvements from CM's build system
- custom kernel building is fixed
- colours! (thanks to @cdesai)
- other small improvements from random CM