Fix compilation of MO files for extensionless POs

When saving a file without extension, the MO wouldn't be compiled into
the right location. Fix the code to use a proper method of replacing the
extension.
Fix gettext build on OS X (again)

Don't rebuild .gmo files from .po if the timestamp is wrong; in theory,
it should be done, in practice, the script has trouble finding msgfmt
and fails to build properly without it (talk about catch-22...).