# Functions
DetailedVersionString returns a detailed version string including version number, git commit, build date, source tree state and the go runtime version.
Exec runs the given cmd in /bin/sh, saves its stdout/stderr streams to the specified files.
ExecCmdInDir executes the given command in given directory and saves output to ./stdout and ./stderr files (truncates files if exists, creates them if not with 0600/-rw------- permissions).
VersionString builds a compact version string in format: vVERSION/git@GitCommit[-State].