finds the cosine similarity between two files