BF: use realpath to make directory name canonical

Getting travis build errors that might be to do with symbolic links