Modify Permission to unix style and added test cases