Improved Trajectory 2013

#include<libgen.h> for base name in Mac OS X