Fix release mode and relative directories.