What is the safest pattern for overriding app home directory via environment variables?