Adds get file endpoint and tests