Truncate the path on logging

Cmake compiles we an absolute path, so the macro __FILE__ also has the absolute file in it.
It seems that gcc doesn't provide macros for the basename, so we have to truncate them in c directly:
https://stackoverflow.com/questions/8487986/file-macro-shows-full-path
Merge pull request #62 from degasus/log_truncate_path

Truncate the path on logging