Drop any extension from the dirname when computing installation directory.