Improved licence handling
Improved input handler matching
Added test cases for image outside Wiki(m|p)edia context

resolves #44