Add ftm-test program and move common stuff to ftm-common.C

also update Makefile to work on less platform sensitive

also figured out that <unknown/> should be <skip/>.