Dynamics of water and small molecules in bioadhesive polymer films