Fix output file extension when --xml is used

Fixes #27.