Rework code to find binary/resources dir