Fix bug with detection of mounted dir