main method for running from command line and better binary file/archive detection