Allow setting portsdir from environment