Fixes dirname on Linux systems