Improved how extension is loaded.

Extension handles get parameters correctly ".jpg?xxx".