Fixed #21732 -- Made compilemessages complain about non-writable location

Instead of crashing with a CommandError, now a non-writable location
of mo files will only make compilemessages complain and continue.
Thanks Ramiro Morales for the review.