Allow override of __FILE__ in assertion messages
Specify file basename for self tests

The goal is to simplify the comparison of actual output with the
expected one as currently we compile out-of-source and __FILE__ contains
directory names as well.
Run tests in platform-independent way