updated function to filter out "." & ".."