Moved detecthost to after detectdistro and made OS X output remove '.local' from hostname.