Added static methods: "file" and "directory". Also added tests for those.