Previously, the PhysFSContext struct would acquire the global PHYSFS_LOCK in its constructor and release it in its destructor, making it impossible to have multiple PhysFSContexts instantiated at the same time. Now, the lock is acquired before physfs functions are called, and released when it goes out of scope. This preserves thread-safety while allowing multiple PhysFSContexts to be created.
Additionally fixes https://github.com/PistonDevelopers/physfs-rs/issues/3
Previously, the PhysFSContext struct would acquire the global PHYSFS_LOCK in its constructor and release it in its destructor, making it impossible to have multiple PhysFSContexts instantiated at the same time. Now, the lock is acquired before physfs functions are called, and released when it goes out of scope. This preserves thread-safety while allowing multiple PhysFSContexts to be created. Additionally fixes https://github.com/PistonDevelopers/physfs-rs/issues/3