move extension check into class extend method
fix path resolving for root location (i.e. no path)