Fixed bug regarding .mat extension
Merge branch 'master' into issue43_refactor