Tidy PR #3534

Shouldn't use native endian specific pack/unpack specifiers.

Should prefer get_env over expand_path