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

Fixes #1538
Ah... I see now. We want the full path. Maybe rename filename to filePath?