Added support for detecting BSD versions; added uname based fallback
on linux in case /etc/*release does not find valid info.