Automagically 'guess' base dir.