KNOX-249: Fix issues with shell scripts and home directory.