Autodetect runnable commands on unix (where chmod values might be wrong) and Windows (where files with weird suffixes are unrunnable.