This function downloads files from OSF and assumes that the file is
public. For private files, the function checks first for a view-only link.
If no view-only link is provided, the user's login credentials are used.
Usage
download_files(id, path = NULL, view_only = NULL, version = NULL)
Arguments
id
Specify the file id (osf.io/XXXXX)
path
Specify path to save file to. If NULL, defaults to OSF
filename in the working directory