File upload bugfixes

  - Cached files are read properly if they contain newlines now, rather
    than just reading the first line
  - Removed unnecessary redownload of first chunk when creating a new
    file bu caching the first chunk and uploading a zero length file