bluray: fix ToCToU between stat() and realpath()