add function to extract filename from sharekey name + tests