Enhancements for Langpack extension action

Add various things to make this script usable as a module for the
Langpack extension: mostly logging and exceptions