Write the .map file in the same directory as the output file.

Fixes #1538
done