More directory fixes, set up a basic autodetect for *nix and Apple devices

Signed-off-by: HACKhalo2 <hackhalo2@gmail.com>