This reverts mount_system to 1882b400 and implements a method to determine the correct system dir separately.