Producing functions in codimension 1

To be used for getting algebraic spaces to be schemes in codimension 1.
Thanks to Raju Krishnamoorthy for a discussion.