replace file system constants with IFileSystem

This is a first step to addressing https://github.com/scriptcs/scriptcs/issues/618 and https://github.com/scriptcs/scriptcs/issues/626.