Check that some directories exist before trying to use them. Calculate the architecture, overridable on the command line.