Added a few checks to catch some bugs when rendering edges
Fixed some file permissions