making sure dirname and basename work by passing the 'right' parameteres