Port makecat.py to core

Change-Id: Icb7c690bf3e8625ad4a10e0f3e9f7b523f54c059
Merge "Port makecat.py to core"