func NewFile(size int) (*LocalFile, error) {
	fileName := strconv.Itoa(fastrand.Intn(math.MaxInt32))
	path := filepath.Join(SiaTestingDir, fileName)
	bytes := fastrand.Bytes(size)
	err := ioutil.WriteFile(path, bytes, 0600)
	return &LocalFile{
		path:     path,
		checksum: crypto.HashBytes(bytes),
	}, err
}
NewFile creates and returns a new LocalFile. It will write size random bytes
to the file and give the file a random name.
package siatest
import (
	"io/ioutil"
	"math"
	"os"
	"path/filepath"
	"strconv"
	"github.com/NebulousLabs/Sia/crypto"
	"github.com/NebulousLabs/errors"
	"github.com/NebulousLabs/fastrand"
)
type (
	LocalFile struct {
		path     string
		checksum crypto.Hash
	}
)