Break it out so we can share it

Signed-off-by: Mike Gehard <mgehard@pivotallabs.com>
Add license file

Signed-off-by: Mike Gehard <mgehard@pivotallabs.com>