added more unit tests and fixed level of granularity in changeExtension()