CB-6372 Port createmobilespec from bash to node.

This is a straight-up port with no change in function. This is the initial
work. Improvements and expansion can come later.