Refactor file-server and add lots of tests [#82415708]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>