OK, I've optimized my open book detection just about as much as I can with this method.
The only faster way using file descriptors would be to assume that the file descriptor will stay constant even after it is removed, I don't think that's a valid assumption though.
Flash disabler
http://pastebin.com/FvVppgEe
Progress bar remover
http://pastebin.com/aMD48vNv
If anyone has any ideas/improvements/suggestions, please share.