Backport the sanity-checking and path fixing for opt from adium.