Well, my script doesn't touch the permissions at all, because it copies the original lib ( /system/lib/hw/gps.exynos4.so ) with it permissions to /tmp and tries to modify it and if the modifying is successfully it copies the lib back to original place.
Maybe you have manually switched the lib...