A man is to stand trial charged with being in possession of a mobile phone and class C drugs at HMP Greenock.