Support diafile files with same names from different directories

In case \diafile is used with the name name but from a different directory the result is only 1 output file. This is corrected with this patch.
In case the dia command failed no error message was given, this is corrected as well.