added normalization of path to remove . and .. directories