func FileExists(path string) bool {
	if _, err := os.Stat(path); os.IsNotExist(err) {
		return false
	}
	return true
}
FileExists will check for the existence of a file and return a bool depending
on if it exists in a given path or not.
package core
import (
	"github.com/mitchellh/go-homedir"
	"os"
	"path/filepath"
	"regexp"
	"strings"
	"syscall"
)
func PathExists(path string, sess *Session) bool {
	_, err := os.Stat(path)
	if e, ok := err.(*os.PathError); ok && e.Err == syscall.ENOSPC {
		return false
	}
	if err == nil {
		return true
	}
	if os.IsNotExist(err) {
		sess.Out.Debug("Path does not exist: %s\n", err.Error())
		return false
	}
	return true
}