Restructure test
Handle directories properly