Common get_extension() function.
Implement basic diff for libraries.