File utils extraction

@appaquet @alexbergeron @mmimeault + some tests to come.