Add tests + behavior for file PUT; update file factory